package model

type User struct {
	UserName string `json:"userName" gorm:"not null;unique;comment:用户账号"`
	Password string `json:"-" gorm:"not null;comment:用户密码"`
	Name     string `json:"name" gorm:"not null;comment:用户昵称"`
	Age      uint8  `json:"age" gorm:"comment:年龄"`
	Sex      bool   `json:"sex" gorm:"comment:性别;"`
	Phone    string `json:"phone" gorm:"default:null;comment:手机号"`
	Email    string `json:"email" gorm:"default:null;comment:邮箱号"`
	Avatar   string `json:"avatar" gorm:"comment:头像地址" xlsx:"头像"`
	Online   bool   `json:"online" gorm:"-"` // 是否在线
	RoleId   string `json:"roleId" gorm:"comment:角色Id"`
	Role     *Role  `gorm:"foreignKey:RoleId;"`
	Model
}
